home *** CD-ROM | disk | FTP | other *** search
/ Red Eye Press Kit / Red Eye Press Kit.iso / pc / main.dxr / SCRIPTS_44_ThumbnailSwap (rollover).ls < prev    next >
Encoding:
Text File  |  2005-07-18  |  832 b   |  41 lines

  1. property swapImage, xLib
  2. global previewImage
  3.  
  4. on getPropertyDescriptionList
  5.   rangeList = []
  6.   xLib = "THUMBNAILS"
  7.   repeat with x = 1 to the number of castMembers of castLib xLib
  8.     if member(x, xLib).type = #bitmap then
  9.       rangeList.add(member(x, xLib).name)
  10.     end if
  11.   end repeat
  12.   description = [:]
  13.   addProp(description, #swapImage, [#default: EMPTY, #format: #string, #comment: "rollover image:", #range: rangeList])
  14.   return description
  15. end
  16.  
  17. on beginSprite me
  18.   image1 = sprite(me.spriteNum).member
  19. end
  20.  
  21. on mouseEnter me
  22.   sendAllSprites(#swapImage, member(swapImage, "THUMBNAILS"))
  23.   cursor(280)
  24. end
  25.  
  26. on mouseLeave me
  27.   sendAllSprites(#swapImage)
  28.   cursor(0)
  29. end
  30.  
  31. on endSprite me
  32.   sendAllSprites(#swapImage)
  33.   cursor(0)
  34. end
  35.  
  36. on mouseUp me
  37.   puppetSound("SFX-CLICK", 2)
  38.   previewImage = swapImage
  39.   go("PREVIEWS")
  40. end
  41.